home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Graphics Programming (2nd Edition) / Visual Basic Graphics Programming 2nd Edition.iso / Src / Ch9 / SaverCfg.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-05-31  |  2.0 KB  |  73 lines

  1. VERSION 5.00
  2. Begin VB.Form frmConfig 
  3.    Caption         =   "ScrSaver Configuration"
  4.    ClientHeight    =   1545
  5.    ClientLeft      =   3555
  6.    ClientTop       =   2850
  7.    ClientWidth     =   3180
  8.    LinkTopic       =   "Form1"
  9.    PaletteMode     =   1  'UseZOrder
  10.    ScaleHeight     =   1545
  11.    ScaleWidth      =   3180
  12.    ShowInTaskbar   =   0   'False
  13.    Begin VB.TextBox txtNumBalls 
  14.       Height          =   285
  15.       Left            =   1920
  16.       TabIndex        =   0
  17.       Top             =   240
  18.       Width           =   495
  19.    End
  20.    Begin VB.CommandButton cmdCancel 
  21.       Cancel          =   -1  'True
  22.       Caption         =   "Cancel"
  23.       Height          =   495
  24.       Left            =   1680
  25.       TabIndex        =   2
  26.       Top             =   840
  27.       Width           =   735
  28.    End
  29.    Begin VB.CommandButton cmdOk 
  30.       Caption         =   "Ok"
  31.       Default         =   -1  'True
  32.       Height          =   495
  33.       Left            =   720
  34.       TabIndex        =   1
  35.       Top             =   840
  36.       Width           =   735
  37.    End
  38.    Begin VB.Label Label1 
  39.       AutoSize        =   -1  'True
  40.       Caption         =   "Number of balls:"
  41.       Height          =   195
  42.       Left            =   720
  43.       TabIndex        =   3
  44.       Top             =   240
  45.       Width           =   1140
  46.    End
  47. Attribute VB_Name = "frmConfig"
  48. Attribute VB_GlobalNameSpace = False
  49. Attribute VB_Creatable = False
  50. Attribute VB_PredeclaredId = True
  51. Attribute VB_Exposed = False
  52. Option Explicit
  53. Private Sub cmdCancel_Click()
  54.     Unload Me
  55. End Sub
  56. ' Save the new configuration values.
  57. Private Sub cmdOk_Click()
  58.     ' Get the new values.
  59.     On Error Resume Next
  60.     NumBalls = CInt(txtNumBalls)
  61.     On Error GoTo 0
  62.     ' Save the new values.
  63.     SaveConfig
  64.     ' Unload this form.
  65.     Unload Me
  66. End Sub
  67. ' Fill in current values.
  68. Private Sub Form_Load()
  69.     ' Load the current configuration information.
  70.     LoadConfig
  71.     txtNumBalls = Format$(NumBalls)
  72. End Sub
  73.